//
//  DeletePhotoTask.m
//  ZooNgonDoiOS
//
//  Created by Anh Jun Linh Tinh on 6/26/12.
//  Copyright (c) 2012 Personal. All rights reserved.
//

#import "DeletePhotoTask.h"

@implementation DeletePhotoTask
-(id)initWithPhotoId:(NSString *)photoId{
    self = [super init];
    if(self){
        _photoId = photoId;
    }
    return self;
}
-(void)doExecute{
    NSDictionary *params = [NSDictionary dictionaryWithKeysAndObjects:@"photo_id",_photoId,nil];
    [[RKObjectManager sharedManager].client delete:@"/photo" usingBlock:^(RKRequest *request){
        request.params = params;
        request.delegate = self;
    }];
}
-(void)request:(RKRequest *)request didFailLoadWithError:(NSError *)error{
    NSLog(@"cde %@",[request.response bodyAsString]);
}
-(void)request:(RKRequest *)request didLoadResponse:(RKResponse *)response{
    NSLog(@"xxxxxxxxxxx %@",[response bodyAsString]);
}
@end
